package com.xhwl.logistics.converter.mapstruct;


import com.xhwl.logistics.dto.http.CarMonthInfoChuangXiangDTO;
import com.xhwl.logistics.entity.VehicleCar;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.NullValueMappingStrategy;

/**
 * 将第三方的车辆信息转换为中台的车辆信息
 */
@Mapper(componentModel = "spring", nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT)
public interface VehicleCarThirdConverter {


    /**
     * 将创享的车辆信息转换为中台的车辆信息
     */
    @Mapping(target = "plateNumber", source = "carMonthInfoChuangXiangDTO.plateNumber")
    @Mapping(target = "ownerName", source = "carMonthInfoChuangXiangDTO.empName")
    @Mapping(target = "ownerPhone", source = "carMonthInfoChuangXiangDTO.empMoblie")
    VehicleCar chuangXiangtoVehicleCar(CarMonthInfoChuangXiangDTO carMonthInfoChuangXiangDTO, Integer cardType, Integer projectId, String projectName,
                                       Integer parkingLotId, String parkingLotName, Integer ownerAccountId, String creatorAccountName,
                                       String editorAccountName);
}
